<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .parent {
            overflow: hidden;
            zoom: 1;
            height:800px;
        }
        .left {
            float: left;
            margin-right: 20px;
            height:800px;
        }
        .right {
            overflow: hidden;
            zoom: 1;
            height:800px;
        }
    </style>
</head>
<body>
    <div class="parent" style="background-color: lightgrey;">
        <div class="left" style="background-color: lightblue;">
            <p>left</p>
        </div>
        <div class="right"  style="background-color: lightgreen;">
            <p>right</p>
            <p>参考文章：<a href="https://blog.csdn.net/VhWfR2u02Q/article/details/84076421" target="_blank">链接</a></p>
            <p>如果是普通的两列布局，浮动+普通元素的margin便可以实现，但如果是自适应的两列布局，</p>
            <p>   利用float+overflow:hidden便可以实现，这种办法主要通过overflow触发BFC,而BFC不会重叠浮动元素。</p> 
            <p>   由于设置overflow:hidden并不会触发IE6-浏览器的haslayout属性，所以需要设置zoom:1来兼容IE6-浏览器。</p> 
            
        
        </div>        
    </div>
</body>
</html>